$(function(){
  // if there is login form
  if ($('#block-user-0').size() > 0) {
    $('#block-user-0').hide();
    
    // bind click handler
	  $('#search-theme-form a.login').click(function(){
	   // if login form is now visible
	    if ($('#block-user-0').is(':visible')) {
	       // hide it
	      $('#block-user-0').slideUp('slow');
	    }
	    else {
	      // show it with slide Down effect 
	      $('#block-user-0').slideDown('fast');
	    }
	    
	    // do not redirect current web-page.
	    return false;
	  });
  }
});
